package com.ws.shop.service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.ws.shop.bean.Page;
import com.ws.shop.entity.Auction;
import com.ws.shop.entity.AuctionLog;

public interface AuctionService {
	/**
	 *
	 *查询竞拍日志 
	 *
	 */
	public AuctionLog findAuctionLog(final long aid,final int uid);
	
	public List<Map<String,Object>> findeAuctionList(final int state,final int limit);
	public double beatsum(final long aid,final int uid);
	public Page findAuctionListPage(int pageno, int i, String goodsname);
	public void saveOrUpdate(Auction auction);
	public Auction findAuctionById(int id);
	public void saveEnd(Auction auction);
	
	public boolean issaveprice(final int uid,final long aid);
	
	public int saveInsured(final int uid,final long aid);
	
	public List<Map<String,Object>> getHead() throws SQLException;
	
	public String getids(int state) throws SQLException;
	
	public List<Map<String,Object>> getRecommend(String date) throws SQLException;
	
	//更新开始竞拍状态
	public int updateState(int id,int state);
	
	public List<Auction> showAuction(String condition );
	
	public Page findAuctionListPage(int pageno, int pagesize,int cid,int state,int isfree);
	//查询出已经达到开始时间的还未修改开始状态竞拍记录
	public List<Map<String, Object>> findAuctionNeedStart();
	
	public  Auction bids(final int uid,final int aid);
	public Page findSelectRobotsByAidPage(int pageno, int i, int id);
	
	public void userAuctioningList(final Page page,final int uid);
	/**
	 * 为竞拍商品指定机器人
	 * @param aid 竞拍商品ID
	 * @param uid 机器人ID
	 */
	public void addauctionrobot(int aid, int uid);
	/**
	 * 删除竞拍商品选定的机器人
	 * @param rid 关联表ID
	 */
	public void delauctionrobot(int rid);
	
	//成交商品数量
	public int getAuctionGoodsTradingVolume(int state);
	public List<Map<String, Object>> findAuctionList(int startrow, int limit,int state);
	public int updateAuctionState(final Auction auction);
	
	public void updateHtml(long id, String htmlFilePath);

}
